<?php
header('Content-type: image/png');
include('includes/index.php');

$im = imagecreatetruecolor(480, 40);
$white = imagecolorallocate($im, 255, 255, 255);
//$grey = imagecolorallocate($im, 128, 128, 128);
//$black = imagecolorallocate($im, 0, 0, 0);
//imagefilledrectangle($im, 0, 0, 399, 29,  $white);

$sql = 'SELECT `titel` FROM `nieuws` ORDER BY `id` DESC';
$query = mysql_query($sql);
$text = '';

while ($result = mysql_fetch_assoc ($query))
{
	$text .= $result['titel'].'
';
//$text .= strip_tags($result['inhoud']);
}
$font  = './verdanab.ttf';

imagettftext($im, 8, 0, 10, 20, $white, $font, $text);

imagepng($im);
imagedestroy($im);
?>
</body>
</html>